package com.dky.satell.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dky.satell.entity.Dictionary;
import com.dky.satell.service.DictionaryService;
import com.dky.satell.mapper.DictionaryMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fangyuan
 * @since 2021-05-28
 */
@Slf4j
@Service
public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Dictionary> implements DictionaryService {

    @Resource
    private DictionaryMapper dictionaryMapper;

    /**
     * 根据key获取数据字典
     * @param key
     * @return
     */
    public Dictionary getByKey(String key) {
        return dictionaryMapper.getByKey(key);
    }

}
